#include "Prop.h"


Proposition proposition[] = {
	
	//{80,false,BANANA_TYPE,1},
	{90,false,STONE_TYPE,1},
	{104,false,GOLD_TYPE,6},
	{180,false,SPEEDUP_TYPE,1},
	{250,false,STONE_TYPE,1},
	//{300,false,STONE_TYPE,1},
	//{350,false,STONE_TYPE,1},
	//{400,false,STONE_TYPE,1},
	//{900,false,STONE_TYPE,1},
	{300,false,SPEEDUP_TYPE,1},
	{310,false,BANANA_TYPE,1},
	{389,false,STONE_TYPE,1},
	//{360,false,GOLD_TYPE,5},

	{423,false,STONE_TYPE,1},
	//{430,false,STONE_TYPE,1},
	//{456,false,STONE_TYPE,1},
	{460,false,GOLD_TYPE,7},
	//{478,false,BANANA_TYPE,1},
	//{490,false,STONE_TYPE,1},

	{513,false,BANANA_TYPE,1},
	//{531,false,STONE_TYPE,1},
	//{555,false,STONE_TYPE,1},
	//{562,false,BANANA_TYPE,1},
	{570,false,GOLD_TYPE,6},
	{586,false,STONE_TYPE,1},

	//{615,false,STONE_TYPE,1},
	//{642,false,STONE_TYPE,1},
	{653,false,BANANA_TYPE,1},
	{675,false,BANANA_TYPE,1},
	{680,false,GOLD_TYPE,6},
	{697,false,STONE_TYPE,1},

	{722,false,STONE_TYPE,1},
	{729,false,BANANA_TYPE,1},
	{734,false,GOLD_TYPE,7},
	{755,false,BANANA_TYPE,1},
	{766,false,STONE_TYPE,1},
	{800,false,STONE_TYPE,1},
	{813,false,STONE_TYPE,1},
	{834,false,STONE_TYPE,1},
	{842,false,BANANA_TYPE,1},
	//{834,false,STONE_TYPE,1},
	{856,false,BANANA_TYPE,1},
	{874,false,STONE_TYPE,1},
	{879,false,STONE_TYPE,1},
	{894,false,GOLD_TYPE,6},

	{931,false,STONE_TYPE,1},
	{961,false,STONE_TYPE,1},
	{977,false,GOLD_TYPE,12},

	{1021,false,STONE_TYPE,1},
	{1065,false,STONE_TYPE,1},
	{1073,false,GOLD_TYPE,5},
	{1087,false,STONE_TYPE,1},

	{1201,false,STONE_TYPE,1},
	{1233,false,STONE_TYPE,1},
	{1245,false,BANANA_TYPE,1},
	{1262,false,BANANA_TYPE,1},
	{1269,false,STONE_TYPE,1},
	{1281,false,GOLD_TYPE,8},

	{1300,false,STONE_TYPE,1},
	//{1300,false,BANANA_TYPE,1},
	{1319,false,GOLD_TYPE,8},
	{1344,false,GOLD_TYPE,7},
	{1365,false,STONE_TYPE,1},
	{1371,false,STONE_TYPE,1},

	//{1432,false,BANANA_TYPE,1},
	{1402,false,STONE_TYPE,1},
	{1421,false,STONE_TYPE,1},
	{1450,false,STONE_TYPE,1},
	{1473,false,GOLD_TYPE,7},
	{1488,false,BANANA_TYPE,1},
	{1493,false,STONE_TYPE,1},

	{1506,false,STONE_TYPE,1},
	//{1542,false,STONE_TYPE,1},
	{1530,false,STONE_TYPE,1},
	{1558,false,STONE_TYPE,1},
	//{1567,false,BANANA_TYPE,1},
	{1569,false,STONE_TYPE,1},
	{1574,false,GOLD_TYPE,6},
	//{1579,false,STONE_TYPE,1},
	{1586,false,STONE_TYPE,1},
	{1592,false,STONE_TYPE,1},

	{1600,false,STONE_TYPE,1},
	//{1632,false,STONE_TYPE,1},
	{1620,false,BANANA_TYPE,1},
	{1654,false,BANANA_TYPE,1},
	{1662,false,GOLD_TYPE,5},
	{1670,false,STONE_TYPE,1},
	{1683,false,GOLD_TYPE,6},
	{1693,false,STONE_TYPE,1},

	{1704,false,STONE_TYPE,1},
	{1732,false,STONE_TYPE,1},
	{1740,false,BANANA_TYPE,1},
	{1754,false,STONE_TYPE,1},
	{1762,false,STONE_TYPE,1},
	{1767,false,STONE_TYPE,1},
	{1776,false,BANANA_TYPE,1},
	{1783,false,GOLD_TYPE,7},
	{1794,false,GOLD_TYPE,6},

	//{1802,false,STONE_TYPE,1},
	//{1827,false,STONE_TYPE,1},
	//{1834,false,STONE_TYPE,1},
	//{1839,false,STONE_TYPE,1},
	//{1852,false,GOLD_TYPE,7},
	//{1863,false,BANANA_TYPE,1},
	//{1872,false,STONE_TYPE,1},

	//{1902,false,GOLD_TYPE,5},
	//{1927,false,STONE_TYPE,1},
	//{1934,false,GOLD_TYPE,7},
	//{1939,false,STONE_TYPE,1},
	//{1945,false,BANANA_TYPE,1},
	//{1967,false,STONE_TYPE,1},
	//{1973,false,BANANA_TYPE,1},
	{1993,false,STONE_TYPE,1},
};






PropCtrl* PropCtrl::pctrl = NULL;

PropCtrl* PropCtrl::getShare(){
	if (pctrl)
	{
		return pctrl;
	}
	else{
		pctrl = new PropCtrl;
		return pctrl;
	}
}

void PropCtrl::setNext(int type,b2Vec2 &pos){
	if (!pList)
	{
		pList = new Prop;
		pList->type = type;
		pList->pos =pos;

		last = pList;
	}
	else{
		Prop *p = pList;
		while(p->next){
			p = p->next;
		}
		p->next = new Prop;
		p->next->type = type;
		p->next->pos = pos;

		last = p->next;
	}
}

Prop *PropCtrl::getHead(){
	return pList;
}

PropCtrl::PropCtrl()
{
	pList = NULL;
	last  = NULL;
	position = proposition;
}
